package java6681.generic;

import java.time.LocalDate;

/**
 * @author Junichiro
 * @description 使用泛型类
 * @date 2021-04-11 11:04
 **/

public class DemoMyMath6681 {
    public static void main(String[] args) {
        MyMath6681<String> str = new MyMath6681<>();
        System.out.println("大："+str.max("小张z","小王ww"));
        System.out.println("小："+str.min("小张z","小王ww"));

        MyMath6681<Integer> num = new MyMath6681<>();
        System.out.println("大："+num.max(22,18));
        System.out.println("小："+num.min(22,18));

        MyMath6681<Character> character = new MyMath6681<>();
        System.out.println("大："+character.max('A','a'));
        System.out.println("小："+character.min('A','a'));

        MyMath6681<LocalDate> local = new MyMath6681<>();
        LocalDate localDate = LocalDate.now();
        LocalDate localDate1 = LocalDate.of(2021,4,9);

        System.out.println("大："+local.max(localDate,localDate1));
        System.out.println("小："+local.min(localDate,localDate1));
    }
}
